﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace SceneManager
{
    public class Rotation
    {
        public float Yaw { get; set; }
        public float Pitch { get; set; }
        public float Roll { get; set; }

        public Rotation(float yaw, float pitch, float roll)
        {
            Yaw = yaw;
            Pitch = pitch;
            Roll = roll;
        }

        public static implicit operator Matrix(Rotation rotation)
        {
            return Matrix.CreateFromYawPitchRoll(rotation.Yaw, rotation.Pitch, rotation.Roll);
        }
        public static implicit operator Quaternion(Rotation rotation)
        {
            return Quaternion.CreateFromYawPitchRoll(rotation.Yaw, rotation.Pitch, rotation.Roll);
        }
        public static implicit operator Vector3(Rotation rotation)
        {
            return new Vector3(rotation.Yaw, rotation.Pitch, rotation.Roll);
        }
    }
}
